package com.stores.v1.entity;

public abstract class Person implements IEntity {
	private int id;
	private String firstName;
	private String lastName;
	private String emailAddress;
	private Address address;
	private Phone phone;
	private UserAccount account;

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public Phone getPhone() {
		return phone;
	}

	public void setPhone(Phone phone) {
		this.phone = phone;
	}

	public UserAccount getAccount() throws UserAccountNullException {
		if (account == null) {
			throw new UserAccountNullException("User Account is null");
		}
		return account;
	}

	public void setAccount(UserAccount account) {
		this.account = account;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
}
